﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Layout/Site.Master" AutoEventWireup="true" CodeBehind="ArticlePost.aspx.cs" Inherits="MyClub.Web.Handlers.ArticlePost" %>
<%@ Register TagPrefix="myclub" Namespace="MyClub.Web.UI.WebControls" Assembly="MyClub.Web" %>
<%@ Register TagPrefix="myclub" TagName="ArticlePost" Src="~/Templates/ArticlePostFull.ascx" %>

<asp:Content ID="HeadContent" ContentPlaceHolderID="HeadContentPlaceholder" runat="server">
    <link id="CategoryFeed" runat="server" rel="alternate" type="application/atom+xml" title="Current Category" />
</asp:Content>

<asp:Content ID="SitePathContent" runat="server" ContentPlaceHolderID="SitePathContentPlaceholder">
    <asp:SiteMapPath ID="SiteMapPath" runat="server" PathSeparator=" : " RenderCurrentNodeAsLink="true" SiteMapProvider="Posts" />
</asp:Content>

<asp:Content ID="Column1Content" ContentPlaceHolderID="Column1ContentPlaceholder" runat="server">
    <asp:LinqDataSource ID="PostData" runat="server"
        ContextTypeName="MyClub.Model.MyClubEntities"
        TableName="Post"
        Where="Id == @postId"
        >
        <WhereParameters>
            <myclub:RouteDataParameter Name="postId" ValueKey="PostId" Type="Int32" ThrowIfKeyMissing="true" />   
        </WhereParameters>
    </asp:LinqDataSource>
    <asp:ListView ID="PostView" runat="server" DataSourceID="PostData" DataKeyNames="Id" ItemPlaceholderID="Post">
        <LayoutTemplate>
            <asp:Panel ID="Post" runat="server" CssClass="post" />
        </LayoutTemplate>
        <ItemTemplate>
            <myclub:ArticlePost ID="ArticlePost" runat="server" />
        </ItemTemplate>
    </asp:ListView>
</asp:Content>